<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('订单号')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input data-pagination="true" data-page-size="1"   data-field="order_no" id="c-order_id" min="0" data-rule="required" data-source="entrepot/receiving/orderlist?type=order_id" class="form-control selectpage" name="row[order_id]" type="text" value="">
                    </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('商标印字')}:</label>

            <div class="col-xs-12 col-sm-8">
                <input id="c-trademark_printing" data-rule="required" data-field="trademark_printing" data-source="entrepot/receiving/orderlist?type=trademark_printing"  class="form-control selectpage" name="row[trademark_printing]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Detail.abbreviation')}:</label>

            <div class="col-xs-12 col-sm-8">
                <input readonly id="c-abbreviation" data-rule="required" class="form-control" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('色号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input data-multiple="true" id="c-colour_id" min="0" data-rule="required" data-field="colour" data-source="entrepot/receiving/orderlist?type=colour" class="form-control selectpage" name="row[colour_id]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('收货人')}:</label>

                    <div class="col-xs-12 col-sm-8">
                        <input id="c-employee_id" min="0" data-rule="required" data-source="other/employee/index" class="form-control selectpage" name="row[employee_id]" type="text" value="">
                    </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('工序')}:</label>

                    <div class="col-xs-12 col-sm-8">
                        <input  id="c-process_attribute_id" data-field="process" min="0" data-rule="required" data-source="entrepot/receiving/orderlist?type=process" class="form-control selectpage" name="row[process_attribute_id]" type="text" value="">
                    </div>
        </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工序收取详情')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="basictpl" data-name="row[process_detail]" id="j-process">
                <dd>
                    <ins class="col-xs-4">色号</ins>
                    <ins>订单数量</ins>
                    <ins>工序累计收取</ins>
                    <ins>本次收取</ins>
                </dd>
<!--                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>-->
                <textarea id="c-process_detail" name="row[process_detail]" class="form-control hidden" cols="30" rows="5">

                </textarea>
            </dl>
            <script id="basictpl" type="text/html">
                <dd class="form-inline">
                    <ins><input disabled type="text" name="<%=name%>[<%=index%>][colour_id]" data-source="other/colour/getColourName" class="form-control selectpage" value="<%=row.colour_id%>" size="10"/></ins>
                    <ins><input disabled type="text" name="<%=name%>[<%=index%>][order_quantity]"  class="form-control" value="<%=row.order_quantity%>" /></ins>
                    <ins><input disabled type="text" name="<%=name%>[<%=index%>][process_received]" class="form-control" value="<%=row.process_received%>"/></ins>
                    <ins><input data-rule="required,is_over,integer" type="number" min="1" name="<%=name%>[<%=index%>][current_quantity]" class="form-control" value="<%=row.current_quantity%>" placeholder="本次收取量"/></ins>
                    <ins><input type="number" min="1" name="<%=name%>[<%=index%>][order_detail_id]" class="form-control hidden" value="<%=row.order_detail_id%>" placeholder="订单id"/></ins>
                    <ins><input type="number" min="1" name="<%=name%>[<%=index%>][process_id]" class="form-control hidden" value="<%=row.process_id%>" placeholder="订单id"/></ins>
                    <!--                <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    document.getElementById("process").onclick=function(){
        $("#process").empty();
        var text1=$('.trademark_printing option:selected').text();
        var text2=$('.colour_id option:selected').text();
        var url="ajax/getorder?type=process&&text1="+text1+"&&text2="+text2;
        $.ajax({
            url: "ajax/getorder?type=process&&text1="+text1+"&&text2="+text2,
            contentType: false,
            processData: false,
            success: function (data) {
                for (i = 0; i < data.length; i++) {
                    $("#process").append( "<option value="+data[i][0].id+">"+data[i][0].name+"</option>" );
                }
            }
        });
    }
    document.getElementById("process").onchange=function(){
        $("#process").empty();
    }; 
</script>